<!-- Content Wrapper. Contains page content -->
<div class="content-wrapper">
    <!-- Content Header (Page header) -->
    <section class="content-header">
        <h1>
            事故定点统计信息
        </h1>
        <ol class="breadcrumb">
            <li><a href="/dashboard"><i class="fa fa-dashboard"></i> Home</a></li>
            <li class="active">事故定点</li>
        </ol>
    </section>

    <!-- Main content -->
    <section class="content">

        <div class="row">

            <!-- 处理线图 -->
            <div class="col-md-6 col-xs-12">

                <div class="box box-primary">
                    <div class="box-header">
                        <h3 class="box-title">事故定点定位量</h3>
                        <div class="box-tools">
                            <div class="btn-group btn-group-sm" style="width: 150px;">
                                <button type="submit" class="btn btn-default" id="btn_proc_data_by_month">月</button>
                                <button type="submit" class="btn btn-default" id="btn_proc_data_by_week">周</button>
                                <button type="submit" class="btn btn-default" id="btn_proc_data_by_day" autofocus="true">日</button>
                            </div>
                        </div>
                    </div>
                    <div class="box-body no-padding">
                        <div id="chart_proc"></div>
                    </div>
                </div>

            </div>
            <?php if ($is_admin): ?>
            <div class="col-md-6 col-xs-12 ">
                <div class="box box-primary">
                    <div class="box-header">
                        <h3 class="box-title">今日各单位定点情况</h3>
                    </div>
                    <div class="box-body no-padding">
                        <div id="chart_today"></div>
                    </div>
                </div>
            </div>
            <?php else: ?>
            <div class="col-md-6 col-xs-12">
                <div class="box box-primary">
                    <div class="box-header">
                        <h3 class="box-title">今日警员定位情况</h3>
                    </div>
                    <div class="box-body no-padding" id="box_today_police_data" style="height: 40%;overflow-y: scroll">
                        <table class="table table-hover" >
                            <?php foreach ($today_police_statistics as $key=>$item): ?>
                                <tr>
                                    <td><span class="label bg-aqua"><?php echo $key + 1; ?></span></td>
                                    <td><?php echo $item["name"] ?></td>
                                    <td><?php echo $item["department"] ?></td>
                                    <td><span class="pull-right"><?php echo $item["count"] ?> </span></td>
                                </tr>
                            <?php endforeach; ?>

                        </table>
                    </div>
                </div>
            </div>
            <?php endif; ?>



            <!-- 使用统计 -->
            <div class="col-md-4 col-xs-12">

                <div class="box box-primary">
                    <div class="box-header">
                        <h3 class="box-title">使用人数统计</h3>
                    </div>
                    <div class="box-body table-responsive no-padding">
                        <table class="table table-hover">
                            <?php foreach ($usage as $key=>$item): ?>
                                <tr>
                                    <td><span class="label bg-aqua"><?php echo $key + 1; ?></span></td>
                                    <td><?php echo $item["department"] ?></td>
                                    <td><span class="pull-right"><?php echo $item["count"] ?> 人</span></td>
                                </tr>
                            <?php endforeach; ?>

                        </table>
                    </div>
                </div>

            </div>

            <!-- 单位处理统计 -->
            <div class="col-md-4 col-xs-12">

                <div class="box box-primary">
                    <div class="box-header">
                        <h3 class="box-title">本月单位定点排名</h3>
                    </div>
                    <div class="box-body table-responsive no-padding">
                        <table class="table table-hover">
                            <?php foreach ($dept_statistics as $key=>$item): ?>
                                <tr data-name="<?php echo $item["department"] ?>" class="<?php if($userdept == $item["department"]) echo 'my-dept'; ?>">
                                    <td><span class="label bg-aqua"><?php echo $key + 1; ?></span></td>
                                    <td><?php echo $item["department"] ?></td>
                                    <td><span class="pull-right"><?php echo $item["count"] ?> </span></td>
                                </tr>
                            <?php endforeach; ?>

                        </table>
                    </div>
                </div>

            </div>

            <!-- 警员处理统计 -->
            <div class="col-md-4 col-xs-12">

                <div class="box box-primary">
                    <div class="box-header">
                        <h3 class="box-title">本月警员定点排名</h3>
                    </div>
                    <div class="box-body table-responsive no-padding">
                        <table class="table table-hover">
                            <?php foreach ($police_statistics as $key=>$item): ?>
                                <tr>
                                    <td><span class="label bg-aqua"><?php echo $key + 1; ?></span></td>
                                    <td><?php echo $item["name"] ?></td>
                                    <td><span class="pull-right"><?php echo $item["count"] ?> </span></td>
                                </tr>
                            <?php endforeach; ?>

                        </table>
                    </div>
                </div>

            </div>
        </div>

    </section>
    <!-- /.content -->
</div>
<!-- /.content-wrapper -->